﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MaxStudio.Concrete.WebSite.Models.FunctionesModels>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	JSONDemo
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<a href="javascript:void(0);" onclick="javascript:upclick(this);">Click Me</a>  
 <script type="text/javascript">  

    function upclick(o) {  

        var obj = $(o);  

        alert(obj);

        $.ajax({

        url: '/JSONDemo/UpdateSingle',

            type: "GET",

            dataType: "json",

            data: { id: obj.attr("id"), actionName: obj.attr("actionName"), actionValue: obj.attr("actionValue") },

            success: function(data) {

            alert(data);
                //                if (data.result == "True") {  

                //                    alert("修改成功！");  

                //                }  

                //                if (obj.attr("actionName") == "ArtVerify") {  



                //                }  

                $(o).html(data[0].name);

                obj.attr("actionValue", data[0].result);

            }

        })  

    }  

</script>  

</asp:Content>
